import Home from '../pages/home'
import Login from '../pages/login'

export default {
	routes: [
		{
			path:'/',
			component: Home,
			children: [
				{
					path: '/',
					props: true,
					component: () => import('../pages/home/center.vue'),
					meta: { 
						title:'管理中心',
						requiresAuth: true,
					}
				},
				//商户
				{
					path: '/merchant/setting',
					component: () => import('../pages/merchant/setting.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/password',
					component: () => import('../pages/merchant/password.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/member/list',
					component: () => import('../pages/merchant/member/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/cash/list',
					component: () => import('../pages/merchant/cash/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/cash/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/cash/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/amount/list',
					component: () => import('../pages/merchant/amount/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/delivery/list',
					component: () => import('../pages/merchant/delivery/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/delivery/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/delivery/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/payinfo/list',
					component: () => import('../pages/merchant/payinfo/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/payinfo/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/payinfo/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/article/list',
					component: () => import('../pages/merchant/article/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/article/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/article/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/article/category/list',
					component: () => import('../pages/merchant/article/category/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/article/category/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/article/category/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//商城
				{
					path: '/shop/goods/list',
					component: () => import('../pages/shop/goods/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/goods/edit/:id?',
					props: true,
					component: () => import('../pages/shop/goods/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/category/list',
					component: () => import('../pages/shop/category/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/category/edit/:id?',
					props: true,
					component: () => import('../pages/shop/category/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/label/list',
					component: () => import('../pages/shop/label/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/label/edit/:id?',
					props: true,
					component: () => import('../pages/shop/label/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/brand/list',
					component: () => import('../pages/shop/brand/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/brand/edit/:id?',
					props: true,
					component: () => import('../pages/shop/brand/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/field/list',
					component: () => import('../pages/shop/field/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/field/edit/:id?',
					props: true,
					component: () => import('../pages/shop/field/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/sku/list',
					component: () => import('../pages/shop/sku/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/sku/edit/:id?',
					props: true,
					component: () => import('../pages/shop/sku/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/evaluate/list',
					component: () => import('../pages/shop/evaluate/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/coupon/list',
					component: () => import('../pages/shop/coupon/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/coupon/edit/:id?',
					props: true,
					component: () => import('../pages/shop/coupon/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/coupon/edit/:id?',
					props: true,
					component: () => import('../pages/shop/coupon/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/express/list',
					component: () => import('../pages/shop/express/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/express/edit/:id?',
					props: true,
					component: () => import('../pages/shop/express/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/delivery/list',
					component: () => import('../pages/shop/delivery/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/delivery/edit/:id?',
					props: true,
					component: () => import('../pages/shop/delivery/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/rule/list',
					component: () => import('../pages/shop/rule/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/rule/edit/:id?',
					props: true,
					component: () => import('../pages/shop/rule/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/speed/list',
					component: () => import('../pages/shop/speed/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/speed/edit/:id?',
					props: true,
					component: () => import('../pages/shop/speed/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/convert/list',
					component: () => import('../pages/shop/convert/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/convert/edit/:id?',
					props: true,
					component: () => import('../pages/shop/convert/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/presell/list',
					component: () => import('../pages/shop/presell/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/presell/edit/:id?',
					props: true,
					component: () => import('../pages/shop/presell/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//订单
				{
					path: '/order/list',
					component: () => import('../pages/order/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/edit/:id?',
					props: true,
					component: () => import('../pages/order/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/show/:id?',
					props: true,
					component: () => import('../pages/order/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/delivery/list',
					component: () => import('../pages/order/delivery/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/delivery/add',
					component: () => import('../pages/order/delivery/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/delivery/show/:id?',
					props: true,
					component: () => import('../pages/order/delivery/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/refund/list',
					component: () => import('../pages/order/refund/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/refund/show/:id?',
					props: true,
					component: () => import('../pages/order/refund/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/exchange/list',
					component: () => import('../pages/order/exchange/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/exchange/show/:id?',
					props: true,
					component: () => import('../pages/order/exchange/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
			]
		},
		{
			path:'/login',
			name: 'Login',
			component: Login,
			meta: {
				title:'管理员登录',
				requiresAuth: false,
			}
		},
		{
			path: '*',
			name: '404',
			component: () => import('../pages/error/404.vue'),
			meta: {
				title:'404页面不存在',
				requiresAuth: false,
			}
		},
	]
}